/**
 * day11
 *
 * @author LQ&LYP lq
 * @ClassName People
 * @description: 封装
 * @date 2025年03月05日
 * @version: 1.0
 */
public class People   {
    //1.  属性私有
         //编号
  private    int   pid;
        //名称
  private   String   name;
        //年龄
    private   int   age;
        //性别
    private    String  sex;
        //  生日
    private    String   birthday;

    //第二步 给同 get   取值 和set  赋值


    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
    //第三步 有参  无参 构造  没有


    public People() {
    }


    public People(int pid, String name, int age) {
        this.pid = pid;
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.birthday = birthday;
    }

    public People(int pid, int age, String birthday) {
        this.pid = pid;
        this.age = age;
        this.birthday = birthday;
    }

     //第四步    toString
    @Override
    public String toString() {
        return "People{" +
                "pid=" + pid +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", birthday='" + birthday + '\'' +
                '}';
    }
}
